package cn.itcast.scala

/*
Date:2022.03.07
Author:donghui
 */

class Point1(var x:Int, var y:Int) {
  //var x:Int = xc
  //var y:Int = yc

  def move(dx:Int, dy:Int): Unit = {
    x = x + dx
    y = y + dy
    println("x = " + x)
    println("y = " + y)
  }
}

object ClassTest1 {
  def main(args: Array[String]): Unit = {
    val pt = new Point1(10,20)
    pt.move(10,10)
  }
}
